Method and Apparatus For Configurable Photodetector Array Patterning For Optical Encoders

ABSTRACT

An encoder device includes an array of detectors that are operable to detect a flux and to generate currents in response to the detection; multiple current lines for conducting currents; a set of switches coupled between the array of detectors and the multiple current lines such that an output of each of the array of detectors is routed to none or one of the multiple current lines; and a controller operable to configure the set of switches.

PRIORITY

This is a continuation application of U.S. patent application Ser. No.15/681,182, filed Aug. 18, 2017, which claims the benefits of U.S. Prov.App. No. 62/473,525 entitled “Method and Apparatus for ConfigurablePhotodetector Array Patterning for Optical Encoders,” filed Mar. 20,2017. The entire disclosure of both applications is incorporated byreference herein.

BACKGROUND

An encoder system, such as an optical encoder, may include anelectro-mechanical device that detects and converts positions (e.g.,linear and/or angular positions) of an object to analog or digitaloutput signals by using one or more photodetectors. There are differenttypes of optical encoders, such as rotary encoders and linear encoders.Manufacturers of rotary and/or linear encoders traditionally require adifferent integrated circuit (IC) design for each different code wheel(for rotary encoders) or code strip (for linear encoders) configuration(radius and pulses-per-revolution for rotary encoders,pulses-per-unit-length for linear encoders, and/or slit shapes) theydeploy. For manufacturers that make many different encoder modules inlow-to-moderate volume with configurations, this necessitates thepurchase of a portfolio of different ICs in low-to-moderate volume. Thisresults in a higher cost and a need of more complex supply chain thanwould be needed if the same IC may be used for multiple encoder modulesregardless of code wheel or code strip configurations.

Accordingly, improvements in the encoder system are desired.

BRIEF DESCRIPTION OF THE DRAWINGS

Aspects of the present disclosure are best understood from the followingdetailed description when read with the accompanying figures. It isemphasized that, in accordance with the standard practice in theindustry, various features are not drawn to scale. In fact, thedimensions of the various features may be arbitrarily increased orreduced for clarity of discussion.

FIG. 1 is an illustration of an example transmissive optical encoder, inaccordance with some embodiments.

FIG. 2 is an illustration of an example pattern of quadrature-track codewheel slits in a transmissive optical encoder system, in accordance withsome embodiments.

FIG. 3 shows an example embodiment of quadrature assignments (A+, A−,B+, B−) to a photoactive region on an optical sensor IC, superimposedupon a code wheel's quadrature track shown in FIG. 2, in accordance withsome embodiments.

FIG. 4 shows aggregate illuminated areas of A+, A−, B+, B− regions inFIG. 3 when a code wheel is rotated clockwise at a constant rate, inaccordance with some embodiments.

FIG. 5 illustrates an example configurable photodetector array andconfigured quadrature assignments to photo pixels in the array,superimposed upon a code wheel's quadrature track, in accordance withsome embodiments.

FIG. 6 shows an example schematic of quadrature assignment mechanism tophoto pixels in a configurable photodetector array, in accordance withsome embodiments.

FIG. 7 shows an example circuit diagram of an example interpolatorresistor ladder architecture that converts configurable photodetectorarray's readings into analog output with transimpedance amplifiers(TIAs), in accordance with an embodiment.

FIG. 8 illustrates a block diagram of an example optical encoder IC, inaccordance with an embodiment.

FIGS. 9A and 9B illustrate example techniques using the configurablephotodetector array to implement alignment check between an opticalencoder and a code wheel, in accordance with some embodiments.

FIGS. 10A and 10B illustrate two example configurations of implementinga quadrature-track pixel array together with an index-track pixel array,in accordance with some embodiments.

FIG. 11 shows a flowchart of an example method of determining a pixelpartition map, in accordance with some embodiments.

FIG. 12 shows a flowchart of an example method of operating an opticalencoder with configurable photodetector array, in accordance with someembodiments.

DETAILED DESCRIPTION

The following disclosure provides many different embodiments, orexamples, for implementing different features of the provided subjectmatter. Specific examples of components and arrangements are describedbelow to simplify the present disclosure. These are, of course, merelyexamples and are not intended to be limiting. Any alterations andfurther modifications to the described devices, systems, methods, andany further application of the principles of the present disclosure arefully contemplated as would normally occur to one having ordinary skillin the art to which the disclosure relates. For example, the features,components, and/or steps described with respect to one embodiment may becombined with the features, components, and/or steps described withrespect to other embodiments of the present disclosure to form yetanother embodiment of a device, system, or method according to thepresent disclosure even though such a combination is not explicitlyshown. Further, for the sake of simplicity, in some instances the samereference numerals are used throughout the drawings to refer to the sameor like parts.

The present disclosure is generally related to optical detection systemand methods thereof, more particularly to an optical encoder with aconfigurable photodetector array and methods for detecting andconverting position information of a target object to analog or digitaloutput signals. For the purposes of simplicity, the embodimentsdescribed herein will use a code wheel (for rotary encoders) as anexample of the target object, although the scope of embodiments mayinclude any suitable optical detection of moving objects. For example,the principles in the present disclosure can also be used for detectinglinear movements (e.g., a code strip for linear encoders). Variousembodiments of the present disclosure enable the use of a single ICdesign for encoder modules of varying configurations without significantdegradation of output signal quality, thus enabling the lower costarising from higher volume and a simpler supply chain resulting fromneeding to manage fewer IC part numbers.

Additionally, other embodiments may employ a magnetic detector. However,for ease of illustration, the embodiments described herein focus onoptical detection, and it is understood that such principles may beapplied to magnetic detection systems.

Optical encoders may include incremental encoders that are used to trackmotion and can be used to determine position and velocity. This can beeither linear or rotary motion. Because the direction can be determined,very accurate measurements can be made. FIG. 1 depicts an embodiment ofa transmissive rotary optical encoder. Within FIG. 1, the region of acode wheel labeled “alternating opaque and transparent regions” consistsof one or more tracks. In this example, a track is the set of all pointson the code wheel whose distance from the center of the shaft is betweenan inner radius R1 and an outer radius R2, and the opaque (e.g., bars)and transparent (e.g., slits) regions of the track are arranged suchthat the track has discrete rotational symmetry of order N about theshaft center, where N≥1. One such track on an incremental encoder isknown as the quadrature track, whose order of rotational symmetry istermed the pulses per revolution (PPR) of the encoder system.

FIG. 2 depicts an example embodiment of a quadrature track. The opticalsensor integrated circuit (IC) in FIG. 1 contains a plurality ofphotoactive areas, grouped into regions, such as A+, A−, B+, and B−regions, and aligned to the quadrature track of the code wheel (i.e. ata distance from the axis of code wheel rotation between R1 and R2 of thequadrature track). Each of the A+, A−, B+, and B− regions is composed ofone or more discrete photoactive areas connected in parallel (so thatthe photocurrents of the parallel discrete photoactive areas areadditive). A light emitter (e.g., an LED) illuminates lights towards thephotoactive areas. The light would be blocked by the opaque regions ofthe track or pass through the transparent regions and arrive at thephotoactive areas.

FIG. 3 depicts an example embodiment of the A+, A−, B+, and B− regionsof the optical sensor IC in a system with part of the code wheelquadrature track superimposed. FIG. 4 depicts the aggregatephotocurrents of the A+, A−, B+, and B− regions as depicted in FIG. 3over a span of time assuming a constant code wheel rotation rate (hereinaggregate photocurrent is assumed to be directly proportional toaggregate illuminated area). As can be seen in FIG. 4, the photocurrentwaveforms are periodic with period 1/(f_(CW)*PPR), where f_(CW) is therotational frequency of the code wheel and PPR is the order ofrotational symmetry of the quadrature track of the code wheel. Moreover,the photocurrent waveforms are approximately sinusoidal and are inquadrature (i.e. equal in magnitude and separated in phase by 90°). Thescheme depicted in FIG. 3, where the photoactive areas on the sensor ICalternate spatially between the A+, B+, A−, and B− regions and areclosely matched in size and position to the geometries of the slits andbars in the quadrature track of the code wheel, is known as aphased-array design. Because the geometry of the code wheelquadrature-track slits and bars changes if the code wheel configuration(radius and PPR) changes, a phased-array design intended for use with aparticular code wheel configuration does not operate properly when usedwith a different code wheel configuration. Furthermore, different codewheels may have different slit shapes. In the illustrated embodiment,the slit shape is regular, such as a pie-shaped with a radius at eachend, and different slits may have an identical slit shape. In variousother embodiments, a slit shape may be irregular, while different slitson a same code wheel may further have different shapes. Therefore,manufacturers of incremental encoders traditionally require a differentIC design for each different code wheel configuration they deploy. Formanufacturers that make many different encoder modules inlow-to-moderate volume with configurations, this necessitates thepurchase of many different ICs in low-to-moderate volume. This resultsin a higher cost and more complex supply chain than would be needed ifthe same IC may be used for multiple encoder modules regardless ofconfiguration.

For example, if a customer normally supports 3 code wheel radii and 4different PPR per radii, then the customer would have to maintain aninventory of 12 different ASICs (at least in theory). It is thereforedesired to enable the use of a single IC design for encoder modules ofvarying configurations without significant degradation of output signalquality, thus allowing the lower cost arising from higher volume and asimpler supply chain resulting from managing fewer IC part numbers. Theprinciples in this disclosure would allow the customer to inventory asingle IC for a multitude of code wheel radii and PPR, generallyallowing a lower cost position for the customer due to higher volumesand reduced material handling.

FIG. 5 illustrates a configurable photodetector array and an example ofconfigured quadrature assignment to each photodetector in the array,superimposed upon a code wheel's quadrature track. The configurablephotodetector array forms a photoactive area of the IC. Eachphotodetector may include either a photodiode or a phototransistor. Forsimplicity, a photodetector in the array is also referred to as a photopixel, or a pixel, and the configurable photodetector array is alsoreferred to as pixel array. The photodetector in the illustratedembodiment is merely an example, and is not intended to limit thepresent disclosure beyond what is explicitly recited in the claims. Theprinciple of the present disclosure may also be applicable to a magneticencoder. For example, a magnetic encoder system may have a configurablemagnetic-field detector array to detect magnetic flux changes due tomodulation from a moving object, such as a code wheel or a code stripe.

In an example pixel array, each pixel can be configured to any one ofthe quadrature assignments (i.e., A+, A−, B+, B−). This configurationcan be done when the IC is powered up by reading from a pixel partitionmap stored in a memory module, such as a non-volatile memory. Theconfiguration may also be updated on-the-fly. For example, in FIG. 5,the pixel in the top left corner is assigned B+ based on a pixelpartition map fitted to a particular code wheel configuration, whilewhen the IC is installed with a different code wheel, the pixel may bechanged to A+, A−, or B−, depending on a different pixel partition map.Or, during an optical encoder operation, the system may determine toincrementally change the pixel map on-the-fly, and this particular pixelmay be changed from B+ to A+, A−, or B−, together with some other pixelsin the pixel array. Also, there can be more than one pixel array in theIC. In some embodiments, one or more tracks of the code wheel arealigned to one or more pixel arrays.

In some embodiments, pixels configured with the same quadratureassignments form photoactive regions in strip shapes. In someembodiments, the pixels configured with the same quadrature assignmentsform photoactive regions in mosaic shapes. The assignment of the pixelsis typically a consideration of the code wheel's radius and PPR, andpixel array's shape, pixel numbers, and spacing. In some embodiments,the consideration of pixel assignment also includes installationmisalignments between the IC and the code wheel. In furtherance of someembodiments, the consideration of pixel assignments includes correctingunbalanced currents or gains, such as due to installation misalignments.

A pixel array may have a rectangular shape, a square shape, or othershapes suitable. The shape of pixels may also be made non-homogeneouswithin the pixel array. Having different size/shape pixels may reducetotal system noise. The rectangular, grid-based pixels may produce asmall amount of noise compared with an ideally shaped detector thatbetter matches the slit. Adjusting the shape to round, elliptical, orrounded corners may reduce overall noise. Further, changing the size ofindividual or groups of pixels may also improve system noise at theexpected cost of increased layout complexity and increased modelingrequirements to determine pixel mapping.

A pixel array may include a plurality of pixels and a plurality oflumped current-mode outputs. Referring to FIG. 6, each pixel includes aphotoactive area with at least two electrical terminals, in whichcurrent flows between the first terminal (connected to all pixels in thearray, also as common terminal) and the second terminal (unique to eachpixel, also as individual terminal) in proportion to the optical powerincident to the photoactive area. The second terminal is coupled to anelectrical switch (e.g., MUX). The electrical switch receivesconfiguration bits from control lines (e.g., a bus line, or an SRAM wordline) and routes the individual terminal of the photoactive area to oneof the lumped current-mode outputs, no more than one of which is routedto the individual terminal at any given time. In this way, each lumpedcurrent-mode output carries current equal to the sum of thephotocurrents in the photoactive areas of all pixels whose switches tothat output are closed. One or more memory bits are used to select whichelectrical switch, if any, is to be closed, along with any circuitry andconnections used to control the switches appropriately based on thestates of the memory bits.

The pixels in a pixel array may be partitioned among the various lumpedcurrent-mode outputs based upon the configuration of the code wheel.Partitioning may be performed by writing to the memory bits to controlthe switches. The pattern for the pixels is based on the design of thecode wheel in the system. In an example embodiment, a process ofsimulation or experimentation is used to determine the mapping for thepixels based on the code wheel radii and the slit pattern, which will bediscussed in more detail below. The results are used by the systemmicrocontroller to write into the memory of the ASIC to set each pixelto the correct region.

For example, a pixel array may contain 64 rows by 32 columns of pixels,a total of 2048 pixels. Each pixel requires two bits (e.g., SRAM bits)to associate it to one of the four lump quadrature track assignments.The system may use an 11-bit bus address to select a pixel, and an extra2 bits to select one of the four lump quadrature track assignments.

In some embodiments, pixels can be set to off. An example solution setseach pixel to one of the 4 primary regions: A+, B+, A−, B−. It may beadvantageous in some cases to turn individual pixels off. This may beperformed pixel-by-pixel or based on entire rows or columns. This mayallow the pixels to potentially more closely match the code wheelpattern. Further, this capability may allow better current balancingacross the 4 main regions, simplifying the design of the downstreamblocks in the ASIC like the transimpedance amplifiers (TIAs), filters,and comparators. One implementation to shut a pixel off is to add onemore control bit to the MUX to select a status that none of the fourlump current mode outputs are coupled to the individual terminal.

In some embodiments, pixels may be set to some intensity other thanfully on. Normally pixels are fully on and assigned to one of 4 regions.Pixels may be set for partial intensity allowing a weighted currentoutput, such as a half or quarter pixel to be used, or even zero (i.e.,pixel is off) with extra one or more control bits. This intensityadjustment may potentially improve the mapping of pixels in a fixedpattern to the slits in a code wheel.

The lumped current outputs in this example are routed to transimpedanceamplifiers (TIAs), such as four single ended TIAs or two differentialTIAs. These amplifiers convert the current output from the pixel arrayinto voltage signals that can be used for downstream processing. TheseTIAs are sized appropriately for the current outputs from the 4 blocks.In an embodiment, The TIAs may be highly linear in order to producehigh-quality analog outputs for the quadrature tracks. In anotherembodiment, the TIAs are logarithmic, in order to accommodate a widedynamic range of input (e.g., when analog quadrature-track outputsaren't needed). The transimpedance should be large enough to keep theangular position error introduced by the amplifier's own internal noiseand offset of downstream comparators small, yet small enough to preservegood linearity at full-scale input current. Each TIAs' instance may havean adjustable current sink additive to its input, for offsetcompensation. The current sink value for a particular instance may becontrolled by a control byte corresponding to that instance. Theadjustable current sink may include latches in which to store thecontrol bit(s) (e.g., a byte).

FIG. 7 shows a circuit diagram of an example interpolator resistorladder architecture that converts configurable photodetector array'sreadings into analog output with transimpedance amplifiers (TIAs). Thisis merely an example. Other suitable implementations, such as othersuitable number of interpolator resistors (≥2) and/or other suitablecircuit topology, may also be used. In the illustrated embodiment, thisblock generates analog waveforms that are phase-shifted from thefiltered A+/A−/B+/B− TIA output waveforms by between 0° and 90° in equalsteps of 5.625° (=90°/16). By digitally comparing appropriateinterpolated waveforms, square waves of up to 16× the frequency of theTIA outputs can be generated for this example embodiment. The blockconsists of four identical resistor ladders, each between the filteredoutputs of two of the four quadrature-track TIAs (A+, A−, B+, B−): onebetween the B+ and A− filtered TIA outputs, one between the A- and B−filtered TIA outputs, one between the B− and A+ filtered TIA outputs,and the fourth between the A+ and B+ filtered TIA outputs. Various otherembodiments may be scaled as appropriate to provide any number of steps.

FIG. 8 illustrates a block diagram of an example optical encoder IC.After the TIA, the system may optionally contain a filter to removeharmonics introduced by the non-ideal mapping of pixels to code wheelslits. The filter is not strictly required and can be inserted toimprove overall performance. The non-ideal shape of the mapped pixelscompared to a phase-array may cause some distortion of the signals. Thisfilter may also be configurable to adapt different operating speeds ofthe code wheel. Much of this distortion can be corrected by applying afilter to reduce harmonics. Other elements in the block diagram includebut not limited to interpolator, comparator, output drivers, and powersupply. Optical encoders generally offer either digital or analogoutputs and the pixel array enables both. In the case of analog outputs,the 4 channels are sent to an external ADC where they are sampled andsent to a signal processing chip/microcontroller to determine positionand rate of change. Digital outputs can be made by running the analogsignals through internal comparators in the ASIC to produce a quadraturebinary output that does not require an external ADC. The capabilities ofinterpolation and decimation plus analog/digital outputs are common tomany encoders and are not unique, nor are they restricted by the pixelarray.

The encoder IC may also provide current control for the companion lightemitter (e.g., an LED), either driving at a constant current overvoltage/temperature or using feedback to provide a constant opticalpower density. Either the pixel array or a discrete detector may be usedto monitor this feedback. This concept is not specific to the pixelarray other than the potential use of a row or column to serve as thefeedback mechanism. Furthermore, a combination of pixel dithering andLED current drive changes may provide improvement in detection of smallchanges.

FIGS. 9A and 9B shows some extension usage to the pixel array,particularly an alignment check between an optical encoder and a codewheel, according to an example embodiment. The example pixel array maybe used to either assist mechanical alignment of a system, or to remappixels to provide an equivalent mechanical alignment, or both (orother). The pixels in the array may be set to a unique pattern duringthe manufacturing process to aid with alignment. Once the IC and PCBboard have been locked in place mechanically, the pixel array patternmay be modified to further enhance performance. The theoretical patternfor the pixel array assumes perfect (or near-perfect) alignment betweenthe array and the code wheel slits. The mechanical stackup (housing,PCB, chip placement, die placement in chip) may cause a non-trivialerror. The in-situ performance of the system may be measured and acustom pixel pattern may be calculated and used for each unique systemcomprising mechanical and electrical components. Pixels may be mappedinto a quarter or row configuration and the outputs from the regionscompared while rotating the code disk. If the pixel array was off-centerfrom the code wheel, the analog outputs from the 4 pixel channels wouldbe unbalanced indicating to the operator that the array was mis-alignedand providing an indication of which direction to move to better alignthe ASIC with the code wheel.

FIG. 9A illustrates a pixel array may assign all or part of pixels intoa ref_top region and a ref_bottom region, while non-assigned pixelsoutside these two regions may be turned off. The optical detector maydetermine the Y-direction misalignment by comparing the currentdifference between these two regions. Alternatively, in FIG. 9B, a pixelarray may assign all or part of pixels into a ref_left region and aref_right region. Again, by comparing current difference between thesetwo regions, X-direction misalignment can be derived. After thismisalignment calibration, the system may then tune the pixel partitionmap to compensate the misalignment. The misalignment can be measured bythe pixel array or by a secondary (separate) pixel array. In someembodiment, the misalignment is measured by a set of separate opticalsensors.

Pixels may potentially be dithered during run time. Normally pixels areset to a static configuration at startup. Having the ability to shift apixel from one region to another or to off, may allow increasedperformance particularly at low rotation speeds. Dithering is often donein signal processing to help interpolate between adjacent values. Thistechnique may be applied here. Such embodiment may employ a secondmemory to set pixels and the ability to switch between memories in avery short time. This may be accomplished by a second register and a muxto select.

FIG. 10A shows a separate pixel array can be used for index trackpurposes. Traditional encoders have had separate code wheel tracks toprovide index tracking: one pulse per revolution, or a one-thirdidentification of the code wheel location. The separate array may beused for any of these purposes and may in some instances be used forindex track separately from configuration. Alternatively, one pixelarray can be partitioned into a quadrature-track pixel region and anindex-track pixel region, as shown in FIG. 10B. Again, the index-trackpixel region can be converted to part of a larger quadrature-track pixelregion during run time, depending on system needs.

The optical encoder may be adapted for use in both transmissive andreflective architectures. The description here is for a transmissivedesign where the LED is on one side of the code wheel and the detectoris on the other. In a reflective design, the LED sits on the same sidewith the detector IC, either on-chip or off-chip with the detector IC,and reflects light off the code wheel with reflective “slits” andnon-reflective spaces. This provides a smaller customer design. Thepixel array supports both transmissive and reflective architectures. Inan exemplary reflective design, the LED is on the same die with thedetector IC. In another exemplary reflective design, the LED and thedetector IC are on two separate devices (e.g., two dies) but physicallyassembled together.

The concept can be applied to linear encoders as well as rotary. In alinear design, the equivalent of code slits would be on a linear axisand slide up/down the pixel array. The pixel array would work equallywell in that scenario. For example, in a linear encoder embodiment themotion object may include pulses-per-length, as opposed to a rotaryencoder that uses radius and PPR.

The pixels may be constructed with configurations accessed either from arandom-access memory (RAM) or from a non-volatile memory (NVM). In thecase of RAM, a host microcontroller may set each memory. Alternatively,the encoder ASIC may contain logic to read from an external NVM or aninternal NVM and set the memory that way. Internal NVM may beprogrammable—i.e., flash, or may be a one-time-programmable memory. Thepixels may also be set using a read-only memory (ROM) to store staticpattern although that reduces the advantage of customer flexibility.Customers with sufficient volume may order a ROM pattern to eliminatethe need to configure the memory at run time.

FIG. 11 shows a flow chart of an example method 300 to determine a pixelpartition map for configuring the pixel array. A physically separatecomputer system (e.g., a PC) and/or other microcontroller unit(s) mayexecute the operations of method 300 by reading code from acomputer-readable medium and executing that code to provide thefunctionality discussed herein. In an example embodiment, method 300 isexecuted by a standalone computer system (e.g., a PC) during amanufacturing operation, rather than by the microcontroller unit in theencoder IC or during the encoder run time. At operation 302, code wheelgeometry characteristics are collected from the setup of the code wheel,as stored in memory. The code wheel geometry characteristics may includewheel radii, PPR, and rotation speed (for example, as PPR increases, themapping of the pixels may look increasingly less like a traditionalphased-array configuration). Alternatively, if the motion object is acode strip instead of the code wheel, the geometry characteristics mayinclude a pulse-per-length parameter of the code strip. At operation304, pixel array characteristics are collected from the setup of thepixel array, as stored in memory. The pixel array characteristicsinclude pixel array dimensions (e.g., row by column), pixel spacing,pixel shape, pixel size. The pixel array characteristics may includeX-/Y-direction misalignment information in other embodiments.

At operation 306, the method 300 determines a pixel partition map. Thedetermining of a pixel partition map may rely on calculating a thresholdof different pixel partition maps, such as a threshold of an errordeviation from 100% precision. When a candidate pixel partition mapreaches the threshold, it may be selected as the final pixel partitionmap. At operation 308, the method 300 stores the pixel partition map toa memory module, such as the memory module in the encoder IC.

FIG. 12 shows a flow chart of an example method 500 of operating anoptical encoder with pixel array. A microcontroller or other processorof an encoder may execute the operations of method 500 by reading codefrom a computer-readable medium and executing that code to provide thefunctionality discussed herein. At operation 502, the optical encoderretrieves a pixel partition map from a memory module after a power up.In an embodiment, the optical encoder may run an internal state machinethat reads an external non-volatile memory to load the map. At operation504, each pixel in the pixel array is configured to a state defined inthe pixel partition map, for example the map defines each individualpixels into the four quadrants discussed above. For example, controlsignals may be applied to switches (e.g., multiplexors of FIG. 6) tocouple each pixel with a respective current line. At operation 506, theoptical encoder performs an optical detection, by collecting currentsfrom different assigned regions on the pixel array in response to alight emitter that is modulated by a moving object, such as code slitsrotating around a linear axis or sliding up/down a linear strip.

In some embodiments, the retrieved pixel partition map is formisalignment calibration purpose, and then the system may go intooperation 508 that measures and generates misalignment results andfollowed by the operation 510 that re-computes a pixel partition map forformal operation usage and write into the memory module. Instead, themethod 500 may go from operation 506 to operation 512 directly togenerate digital or analog outputs, such as quadrature-track and/orindex-track outputs, from the optical measurement.

Although not intended to be limiting, one or more embodiments of thepresent disclosure provide many benefits to an optical encoder usingconfigurable photodetector array. As most conventional optical encoderdesigns use a fixed pattern phased array for detectors, such patternexactly matches a code wheel, thus limiting the array to a specific sizeand PPR (pulse per revolution) code wheel. These conventional phasearrays (4 channels typically) are each routed to a dedicated amplifierchannel.

In contrast, the pixel array described with respect to variousembodiments may have configurable pixels that may be set by a memory tomap to one of the four channels. The configurable pixels may be seteither by a host microcontroller, using an internal non-volatile memorywith a circuit to read and set, or by using a masked ROM where thepixels are set in some factory alignment configuration. However, variousembodiments may use any appropriate processor or memory. Furthermore,in-system configurability is possible for some embodiments. Encodermanufacturers may apply a patch in the field, updating the pixel mapafter the product has been installed in the field. This patch mayimprove or otherwise change performance characteristics.

Also, the lack of a visible phased-array pattern makes the design lesssusceptible to cloning. Traditionally, a regular phased-array can beobserved under a microscope to determine size of features thus allowinga competitor to copy the design. The pixel array does not have anyindication of mapping thus requiring the I²C or other protocol stream tobe interrupted in order to determine which pixels are mapped to whichquadrant. This would be considerably more difficult to copy.

Moreover, the configurable pixel arrays may also allow a customer to usesame IC to develop a product portfolio of difference performance levels,for example by setting different thresholds in operation 306 of method300 (FIG. 11) to limit an optical encoder's precision level. Therefore,encoder manufacturers may provide different performance/price pointswith a common set of hardware including code wheel. Remapping the pixelarray with a common code wheel may allow different performance of theresulting system. Encoder manufacturers may offer higher or lower pricepoints based on performance with identical hardware thus allowing themto market their products differently.

The principle of the present disclosure may also be applicable to amagnetic encoder as to an optical encoder. For example, in a magneticencoder, instead of a configurable photodetector array including aplurality of photodetectors, the system may have a configurablemagnetic-field detector array including a plurality of magneticdetectors. A magnetized part in the emitter generates a magnetic flux.The configurable magnetic-field detector detects changes of the magneticflux modulated by the moving object, such as a code wheel or a codestripe. The other aspects of the magnetic encoder are similar to whathave been described above in the optical encoder and omitted here forthe sake of simplicity.

The foregoing outlines features of several embodiments so that thoseskilled in the art may better understand the aspects of the presentdisclosure. Those skilled in the art should appreciate that they mayreadily use the present disclosure as a basis for designing or modifyingother processes and structures for carrying out the same purposes and/orachieving the same advantages of the embodiments introduced herein.Those skilled in the art should also realize that such equivalentconstructions do not depart from the spirit and scope of the presentdisclosure, and that they may make various changes, substitutions, andalterations herein without departing from the spirit and scope of thepresent disclosure.

What is claimed is:
 1. An encoder device, comprising: an array ofdetectors that are operable to detect a flux and to generate currents inresponse to the detection; multiple current lines for conductingcurrents; a set of switches coupled between the array of detectors andthe multiple current lines such that an output of each of the array ofdetectors is routed to none or one of the multiple current lines; and acontroller operable to configure the set of switches.
 2. The encoderdevice of claim 1, wherein the multiple current lines include fourlines.
 3. The encoder device of claim 1, wherein the array of detectorshas non-homogeneous shapes.
 4. The encoder device of claim 1, whereinsome detectors of the array of detectors are of a rectangular shape, around shape, an elliptical shape, or a shape having rounded corners. 5.The encoder device of claim 1, further comprising a first memory that isoperable to store first data for configuring the set of switches,wherein the controller is operable to access the first data from thefirst memory.
 6. The encoder device of claim 5, further comprising asecond memory that is operable to store second data for configuring theset of switches, wherein the controller is operable to access the firstdata from the first memory and to access the second data from the secondmemory.
 7. The encoder device of claim 1, wherein some of the array ofdetectors are operable to be turned off or partially on duringoperations of the encoder device.
 8. The encoder device of claim 1,further comprising multiple transimpedance amplifiers coupled to themultiple current lines.
 9. The encoder device of claim 8, wherein eachof the multiple transimpedance amplifiers includes an adjustable currentsink additive to its input.
 10. An encoder apparatus, comprising: anarray of photodetectors that are operable to generate currents inresponse to detection of light incident thereon; multiple current linesfor conducting currents; a set of switches coupled between outputs ofthe array of photodetectors and the multiple current lines; a memoryoperable to store data; and a controller operable to access the datafrom the memory and configure the set of switches according to the datasuch that an output of each of the array of photodetectors is connectedto no more than one of the multiple current lines at a time.
 11. Theencoder apparatus of claim 10, further comprising an emitter operable togenerate the light.
 12. The encoder apparatus of claim 10, furthercomprising a motion object that is operable to modulate the light beforethe light is detected by the array of photodetectors.
 13. The encoderapparatus of claim 10, wherein some of the array of photodetectors areoperable to be turned off or partially on during operations of theencoder apparatus.
 14. The encoder apparatus of claim 10, wherein thearray of photodetectors includes photodetectors of different sizes or ofdifferent shapes.
 15. A method, comprising: collecting firstcharacteristics of a motion object; collecting second characteristics ofa configurable detector array that includes an array of detectors;determining a partition map that defines quadrature states for the arrayof detectors based on the first and the second characteristics; andstoring the partition map into a non-volatile memory.
 16. The method ofclaim 15, wherein the motion object is a code wheel and the firstcharacteristics include radii, pulse per resolution, or rotation speedof the code wheel.
 17. The method of claim 15, wherein the secondcharacteristics include dimensions of the array of detectors, detectorspacing, detector shape, detector size, X-direction misalignment betweenthe array of detectors and the motion object, or Y-directionmisalignment between the array of detectors and the motion object. 18.The method of claim 15, further comprising: retrieving the partition mapfrom the non-volatile memory; configuring the configurable detectorarray according to the partition map; and performing a detection ofmovement of the motion object.
 19. The method of claim 18, furthercomprising: from the detection of movement of the motion object,generating data about misalignment between the motion object and theconfigurable detector array.
 20. The method of claim 19, furthercomprising: computing another partition map based on the data about themisalignment.